package com.run_java_test.test_controller;

import com.run_java_test.test_service.JarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("test_jar")
public class JarController {
    private final JarService jarService;

    @Autowired
    public JarController(JarService jarService) {
        this.jarService = jarService;
    }

    // /sp33_run_java_code/test_jar/run_jar
    @GetMapping("run_jar")
    public String jar() {
        return jarService.test();
    }
}